package com.ruoyi.locate.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.locate.domain.WWarehouseMapDataExt;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.locate.mapper.WWarehouseMapDataMapper;
import com.ruoyi.locate.domain.WWarehouseMapData;
import com.ruoyi.locate.service.IWWarehouseMapDataService;

/**
 * 仓位数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-08 17:39:15
 */
@Service
public class WWarehouseMapDataServiceImpl implements IWWarehouseMapDataService 
{
    @Autowired
    private WWarehouseMapDataMapper wWarehouseMapDataMapper;

    /**
     * 查询仓位数据
     * 
     * @param dataId 仓位数据主键
     * @return 仓位数据
     */
    @Override
    public WWarehouseMapData selectWWarehouseMapDataByDataId(Long dataId)
    {
        return wWarehouseMapDataMapper.selectWWarehouseMapDataByDataId(dataId);
    }

    /**
     * 查询仓位数据列表
     * 
     * @param wWarehouseMapData 仓位数据
     * @return 仓位数据
     */
    @Override
    public List<WWarehouseMapData> selectWWarehouseMapDataList(WWarehouseMapData wWarehouseMapData)
    {
        return wWarehouseMapDataMapper.selectWWarehouseMapDataList(wWarehouseMapData);
    }

    /**
     * 新增仓位数据
     * 
     * @param wWarehouseMapData 仓位数据
     * @return 结果
     */
    @Override
    public int insertWWarehouseMapData(WWarehouseMapData wWarehouseMapData)
    {
        wWarehouseMapData.setCreateTime(DateUtils.getNowDate());
        return wWarehouseMapDataMapper.insertWWarehouseMapData(wWarehouseMapData);
    }

    /**
     * 修改仓位数据
     * 
     * @param wWarehouseMapData 仓位数据
     * @return 结果
     */
    @Override
    public int updateWWarehouseMapData(WWarehouseMapData wWarehouseMapData)
    {
        wWarehouseMapData.setUpdateTime(DateUtils.getNowDate());
        return wWarehouseMapDataMapper.updateWWarehouseMapData(wWarehouseMapData);
    }

    /**
     * 批量删除仓位数据
     * 
     * @param dataIds 需要删除的仓位数据主键
     * @return 结果
     */
    @Override
    public int deleteWWarehouseMapDataByDataIds(Long[] dataIds)
    {
        return wWarehouseMapDataMapper.deleteWWarehouseMapDataByDataIds(dataIds);
    }

    /**
     * 删除仓位数据信息
     * 
     * @param dataId 仓位数据主键
     * @return 结果
     */
    @Override
    public int deleteWWarehouseMapDataByDataId(Long dataId)
    {
        return wWarehouseMapDataMapper.deleteWWarehouseMapDataByDataId(dataId);
    }

    /**
     * 清空w_warehouse_map_data
     */
    public int cleanWarehouseMapData()
    {
        return wWarehouseMapDataMapper.cleanWarehouseMapData();
    }

    /**
     * 查询仓位数据列表
     *
     * @param wWarehouseMapDataExt 仓位数据
     * @return 仓位数据集合
     */
    public List<WWarehouseMapDataExt> selectWWarehouseMapDataExt(WWarehouseMapDataExt wWarehouseMapDataExt)
    {
        return wWarehouseMapDataMapper.selectWWarehouseMapDataExt(wWarehouseMapDataExt);
    }
}
